<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">


    <body>

        <ui:composition template="./../template.xhtml">

            <ui:define name="title">
                Event Page
            </ui:define>

            <ui:define name="content">
                              <h:form>
                                  <p:panel id="panel" header="User Profile ">
                        <p:panelGrid>
                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        User ID :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.userID}" styleClass="art-blockcontent-body">
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        User Name :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.userName}" styleClass="art-blockcontent-body" style="word-break:break-all;">
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        Gender :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.gender?'Male':'Female'}" styleClass="art-blockcontent-body">
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        birthDay :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.birthDay}" styleClass="art-blockcontent-body">
                                             <f:convertDateTime pattern="dd/MM/yyyy" />
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>
                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        Email :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.email}" styleClass="art-blockcontent-body">
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>
                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        Address :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.addressInfo}" styleClass="art-blockcontent-body" style="word-break:break-all;">
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>
                            <p:row>
                                <p:column>
                                    <h4 class="art-postheader">
                                        Phone Number :
                                    </h4>
                                </p:column>
                                <p:column>
                                    <h4 class="art-postheader">
                                        <h:outputText value="#{user.phoneNumber}" styleClass="art-blockcontent-body">
                                        </h:outputText>
                                    </h4>
                                </p:column>
                            </p:row>
                            <p:row>
                                <p:column>
                                    <p:commandButton image="ui-icon ui-icon-pencil" action="#{userController.prepareEditprofile}" value="Edit" ajax="false"/>
                                </p:column>
                                <p:column>
                                    <p:commandButton value="Cancel" action="home" immediate="true" ajax="false" />
                                </p:column>
                            </p:row>
                        </p:panelGrid>
</p:panel>
                </h:form>
                
            </ui:define>

        </ui:composition>

    </body>
</html>
